<!-- 模块说明 -->
<template>
    <van-nav-bar title="手机号注册" left-text="" left-arrow @click-left="onClickLeft" />
    <van-form @submit="onSubmit">
        <van-cell-group inset>
            <van-field v-model="username" name="用户名" label="用户名" placeholder="用户名"
                :rules="[{ required: true, message: '请填写用户名' }]" />
            <van-field v-model="number" type="number" name="验证码" label="验证码" placeholder="验证码"
                :rules="[{ required: true, message: '请填写密码' }]" />
        </van-cell-group>
        <van-button type="primary" size="mini" class="mini" color="#e1e1e1">获取验证码</van-button>
        <div style="margin: 16px;">
            <van-button round block type="primary" color="#df9464" native-type="submit" @submit="onSubmit">
                下一步
            </van-button>
        </div>
    </van-form>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { useRouter } from "vue-router"
const router = useRouter()
const username = ref('');
const number = ref('');
const onSubmit = (values) => { router.push('/logon1') };
console.log('submit');

const onClickLeft = () => history.back()

</script>
<style lang="scss" scoped>
.mini {
    float: right;
    margin-bottom: 30px;
    margin-right: 20px;
}
</style>
